from flask import Flask, request

from faker import Faker

app = Flask(__name__)


@app.route('/<method>', methods=['GET'])
def home(method):
    locale = request.args.get("locale",default="zh_CN")
    f = Faker(locale=locale)
    return getattr(f, method)()


if __name__ == '__main__':
    app.run()
